﻿@{
    <link href="~/css/table.css" rel="stylesheet" />
    <script src="~/js/jquery-1.11.1.js"></script>
    <script src="~/js/vue.js"></script>
}
<style>
    .TD_STYLE2 select {
        width: 130px;
    }
</style>
<body>
    <div id="app">
        <form role="form" id="form1">
            <table width="100%">
                <tr>
                    <td>
                        <font color="black">您正在做的业务是:人力资源--培训管理--调动登记查看</font>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                       
                        <input type="button" class="BUTTON_STYLE1" onclick="javascript:window.history.back();" value="返回">
                    </td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr height="21">
                    <td class="TD_STYLE1" width="8%" hidden>主键</td>
                    <td class="TD_STYLE2" width="10%" hidden>
                        <input type="text" id="mch_id" name="mch_id" v-model="mch_id" readonly="readonly"
                               class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                        档案编号
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input type="text" name="human_id" v-model="human_id" id="human_id" readonly="readonly"
                               class="INPUT_STYLE2">

                    </td>
                    <td class="TD_STYLE1" width="8%">
                        姓名
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input type="text" name="human_name" id="human_name" v-model="human_name"
                               readonly="readonly"
                               class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                </tr>
                <tr>

                    <td class="TD_STYLE1" width="8%">
                        原一级机构
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="first_kind_name" name="first_kind_name"
                               v-model="first_kind_name" readonly="readonly"
                               class="INPUT_STYLE2">
                        <input type="hidden" id="first_kind_id" name="first_kind_id" v-model="first_kind_id">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                        原二级机构
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input type="text" id="second_kind_name" name="second_kind_name"
                               v-model="second_kind_name" readonly="readonly"
                               class="INPUT_STYLE2">
                        <input type="hidden" id="second_kind_id" name="second_kind_id" v-model="second_kind_id">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                        原三级机构
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input type="text" id="third_kind_name" name="third_kind_name"
                               v-model="third_kind_name" readonly="readonly"
                               class="INPUT_STYLE2">
                        <input type="hidden" name="third_kind_id" id="third_kind_id" v-model="third_kind_id">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                </tr>

                <tr>
                    <td class="TD_STYLE1">
                        原职位分类
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="major_kind_name" name="major_kind_name"
                               v-model="major_kind_name" readonly="readonly"
                               value="" class="INPUT_STYLE2">
                        <input type="hidden" id="major_kind_id" name="major_kind_id" v-model="major_kind_id">
                    </td>
                    <td class="TD_STYLE1" width="12%">
                        原职位名称
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="major_name" name="major_name"
                               v-model="major_name" readonly="readonly"
                               class="INPUT_STYLE2">
                        <input type="hidden" id="major_id" name="major_id" v-model="major_id">
                    </td>
                    <td class="TD_STYLE1">
                        原薪酬标准
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="salary_standard_name" name="salary_standard_name"
                               v-model="salary_standard_name"
                               readonly="readonly" class="INPUT_STYLE2">
                        <input type="hidden" id="salary_standard_id" name="salary_standard_id" v-model="salary_standard_id">
                    </td>
                    <td class="TD_STYLE1">
                        原薪酬总额
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="salary_sum" name="salary_sum" v-model="salary_sum"
                               readonly="readonly"
                               class="INPUT_STYLE2">
                    </td>

                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        新一级机构名称
                    </td>
                    <td class="TD_STYLE2">                        
                        <input type="text" id="new_first_kind_name" name="new_first_kind_name"
                               v-model="new_first_kind_name" readonly="readonly"
                               class="INPUT_STYLE2">
                        <input type="hidden" id="new_first_kind_id" name="new_first_kind_id" v-model="new_first_kind_id">
<td class="TD_STYLE1" width="12%">
                        新二级机构名称
                    </td>
<td class="TD_STYLE2">
    <input type="text" id="new_second_kind_name" name="new_second_kind_name"
           v-model="new_second_kind_name" readonly="readonly"
           class="INPUT_STYLE2">
    <input type="hidden" id="new_second_kind_id" name="new_second_kind_id" v-model="new_second_kind_id">
</td>
                    <td class="TD_STYLE1" width="12%">
                        新三级机构名称
                    </td>
                    <td class="TD_STYLE2">                       
                        <input type="text" id="new_third_kind_name" name="new_third_kind_name"
                               v-model="new_third_kind_name" readonly="readonly"
                               class="INPUT_STYLE2">
                        <input type="hidden" id="new_third_kind_id" name="new_second_kind_id" v-model="new_second_kind_id">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        新职位分类
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="new_major_kind_name" name="new_major_kind_name"
                               v-model="new_major_kind_name" readonly="readonly"
                               value="" class="INPUT_STYLE2">
                        <input type="hidden" id="new_major_kind_id" name="new_major_kind_id" v-model="new_major_kind_id">
                    </td>
                    <td class="TD_STYLE1" width="12%">
                        新职位名称
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="new_major_name" name="new_major_name"
                               v-model="new_major_name" readonly="readonly"
                               value="" class="INPUT_STYLE2">
                        <input type="hidden" id="new_major_id" name="new_major_id" v-model="new_major_id">
                    </td>
                    <td class="TD_STYLE1">
                        新薪酬标准
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="new_salary_standard_name" name="new_salary_standard_name"
                               v-model="new_salary_standard_name" readonly="readonly"
                               value="" class="INPUT_STYLE2">
                        <input type="hidden" id="new_salary_standard_id" name="new_salary_standard_id" v-model="new_salary_standard_id">
                    </td>
                    <td class="TD_STYLE1">
                        新薪酬总额
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="new_salary_sum" id="new_salary_sum" v-model="new_salary_sum" readonly="readonly"
                               value="0.00" class="INPUT_STYLE2">
                    </td>
                </tr>

                <tr>

                    <td class="TD_STYLE1">
                        登记人
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="register" id="register" readonly="readonly" value="better_admin"
                               class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        登记时间
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="regist_time" readonly="readonly"
                               id="regist_time" class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        复核人
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="checker" id="checker" readonly="readonly" value="better_admin" class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        复核时间
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="check_time" id="check_time" class="INPUT_STYLE2">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        调动原因
                    </td>
                    <td colspan="7" class="TD_STYLE2">
                        <textarea name="change_reason" id="change_reason" v-model="change_reason" rows="6" readonly="readonly" class="TEXTAREA_STYLE1">
						
						</textarea>
                    </td>
                </tr>              
            </table>
        </form>
    </div>
</body>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
    onelist: [],//一级
    secondlist: [],//二级
    thirdlist: [],//三级
    zwfllist: [],         //职位分类
       zwmclist: [],//职位名称
      xcbzlist: [],//薪酬标准
	mch_id : "",
    first_kind_id : "",
    first_kind_name : ""  ,
    second_kind_id : " " ,
   	second_kind_name : ""   ,
    third_kind_id : ""   ,
   	third_kind_name : ""    ,
   	major_kind_id : ""      ,
    major_kind_name : ""   ,
   	major_id : ""      ,
 	major_name : ""    ,
   	new_first_kind_id : ""      ,
    new_first_kind_name : ""    ,
    new_second_kind_id : ""    ,
   	new_second_kind_name : ""      ,
    new_third_kind_id : ""      ,
    new_third_kind_name : ""    ,
    new_major_kind_id : ""     ,
     new_major_kind_name : ""     ,
   	new_major_id : ""        ,
    new_major_name : ""    ,
    human_id : ""    ,
    human_name : ""            ,
   	salary_standard_id : ""    ,
	salary_standard_name : ""  ,
  	salary_sum : ""          ,
    new_salary_standard_id : ""    ,
    new_salary_standard_name : ""  ,
  	new_salary_sum : ""  ,
    change_reason: "",
            register: "",
         //   regist_time: "",
            check_status: "",
            check_reason: "",
           // check_time:"",
        },
        methods: {
            load: function () {
                var t = this;
                alert(@ViewData["id"]);
                $.ajax({
                    url: "/diaodongguanli/detail1?id="+@ViewData["id"],
                    type: "get",
                      success: function (msg) {
                        var dt = eval("(" + msg + ")");
                        t.mch_id = dt.mch_id;
                        t.first_kind_id = dt.first_kind_id;
                        t.first_kind_name = dt.first_kind_name;
                        t.second_kind_id = dt.second_kind_id;
                        t.second_kind_name = dt.second_kind_name;
                        t.third_kind_id = dt.third_kind_id;
                        t.third_kind_name = dt.third_kind_name;
                        t.major_kind_id= dt.major_kind_id;
                        t.major_kind_name = dt.major_kind_name;
                        t.major_id = dt.major_id;
                        t.major_name = dt.major_name;
                        t.new_first_kind_id = dt.new_first_kind_id;
                        t.new_first_kind_name = dt.new_first_kind_name;
                        t.new_second_kind_id = dt.new_second_kind_id;
                        t.new_second_kind_name = dt.new_second_kind_name;
                        t.new_third_kind_id = dt.new_third_kind_id;
                        t.new_third_kind_name = dt.new_third_kind_name;
                        t.new_major_kind_id = dt.new_major_kind_id;
                        t.new_major_kind_name = dt.new_major_kind_name;
                        t.new_major_id = dt.new_major_id;
                        t.new_major_name = dt.new_major_name;
                        t.human_id = dt.human_id;
                        t.human_name = dt.human_name;
                        t.salary_standard_id = dt.salary_standard_id;
                        t.salary_standard_name = dt.salary_standard_name;
                        t.salary_sum = dt.salary_sum;
                        t.new_salary_standard_id = dt.new_salary_standard_id;
                        t.new_salary_standard_name = dt.new_salary_standard_name;
                          t.new_salary_sum = dt.new_salary_sum;
                          t.register = dt.register;
                          t.change_reason = dt.change_reason;
                          t.regist_time = dt.regist_time;
                          t.check_status = dt.check_status;
                          t.check_reason = dt.check_reason;
                          t.check_time = dt.check_time;
                          //登记时间
                          var time = new Date(dt.regist_time);
                          var y = time.getFullYear();
                          var m = time.getMonth();
                          var d = time.getDate();
                          var h = time.getHours();
                          var f = time.getMinutes();
                          var s = time.getSeconds();
                          $("#regist_time").val(y + "-" + m + "-" + d + " " + h + ":" + f + ":" + s)

                          if (dt.check_time == null || dt.check_time == "") {
                              return "";
                          } else {
                              //复核时间
                              var time = new Date(dt.check_time);
                              var y = time.getFullYear();
                              var m = time.getMonth();
                              var d = time.getDate();
                              var h = time.getHours();
                              var f = time.getMinutes();
                              var s = time.getSeconds();
                              $("#check_time").val(y + "-" + m + "-" + d + " " + h + ":" + f + ":" + s)
                          }
                         
                             
                          
                    }
                });
            },
            GetoneId: function () {
                var t = this;
                $.ajax({
                    url: "/diaodongguanli/one",
                    type: "Post",
                    success: function (msg) {
                        var dts = eval(msg);
                        t.onelist = dts;
                    }
                })
            },
            GettwoId: function () {
                var t = this;
                var new_first_kind_id = $("#new_first_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/two?t=" + new_first_kind_id,
                    type: "Post",
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.secondlist = dts;
                    }
                })
            }, GetthreeId: function () {
                var t = this;
                var new_second_kind_id = $("#new_second_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/three?t=" + new_second_kind_id,
                    type: "Post",
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.thirdlist = dts;
                    }
                })
            }, GetZwfl: function () {
                var t = this;
                $.ajax({
                    url: "/diaodongguanli/GetZwfl",
                    type: "Post",
                    success: function (msg) {
                        var dts = eval(msg);
                        t.zwfllist = dts;

                    }
                })
            }, GetZwmc: function () {
                var t = this;
                var new_major_kind_id = $("#new_major_kind_id").val();
                $.ajax({
                    url: "/diaodongguanli/GetZwmc?z=" + new_major_kind_id,
                    type: "Post",
                    success: function (msg) {
                        var dts = eval("(" + msg + ")");
                        t.zwmclist = dts;
                    }
                })
            }, GetXcbz: function () {
                var t = this;
                $.ajax({
                    url: "/diaodongguanli/GetXcsz",
                    type: "Post",
                    success: function (msg) {
                        var dts = eval(msg);
                        t.xcbzlist = dts;
                    }
                })
            }, GetNxc: function () {
                var new_salary_standard_id = $("#new_salary_standard_id").val();
                $.ajax({
                    url: "/diaodongguanli/GetNxc?xc=" + new_salary_standard_id,
                    type: "Post",
                    success: function (msg) {
                        var dts = eval(msg);
                        $("#new_salary_sum").val(dts);
                    }
                })
            }
        },
        mounted: function () {
            this.load();
            this.GetoneId();
            this.GettwoId();
            this.GetthreeId();
            this.GetZwfl();
            this.GetZwmc();
            this.GetXcbz();
          
        }
               
    })
</script>





